library MyKu2;

class Person {
  String name;
  int age;

  Person(this.name, this.age);

  Person.withName(this.name);

  Person.withAge(this.age);
}

class Student extends Person {
  String classRoom;

  Student(String name, int age) : super(name, age) {
    print("Student 默认");
  }

  Student.withName(String name) : super.withName(name) {
    print("Student withName");
  }

  Student.withAge(int age) : super.withAge(age) {
    print("Student withAge");
  }

  Student.withClassRoom(name, age, String room)
      : classRoom = room,
        super(name, age);

  Student.withClassRoom1(name, age, this.classRoom) : super(name, age);
}
